{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "7e555d5a",
   "metadata": {},
   "source": [
    "## 三种进入jn方法\n",
    "* 用户根路径\n",
    "* cd /进入更上一层的根路径\n",
    "* 设置cmd执行jn根路径cd 文件夹名 /"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4ad99286",
   "metadata": {},
   "source": [
    "## 上周回顾\n",
    "> * 1.list的一般方法/函数的使用和案例\n",
    ">> 1. append()增加，增加list元素到list末尾，常用于新建\n",
    ">> 2. pop(index)/remove(values)对比两者的优势\n",
    ">> 3. count()查看某个元素出现的次数\n",
    ">> 4. index()查看某个元素第一次出现的位置\n",
    ">> 5. extend()两个list合并在一起，也可以用[]+[]实现\n",
    ">> 6. ...\n",
    "\n",
    "> * 2. list的高级用法：如\n",
    ">> 1. copy()list(可变的数据类型)复制 不等价于 赋值，可用[:]来实践\n",
    ">> 2. enumerate() 枚举，可同时遍历并获取index和value"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8df50066",
   "metadata": {},
   "source": [
    "## 本周内容：\n",
    "### list练习，vowels.py vowels2.py\n",
    "### list 实践：\n",
    "### 初始字典："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "24b7e924",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-18T07:31:35.843956Z",
     "start_time": "2021-10-18T07:31:35.812756Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "i\n",
      "i\n",
      "a\n"
     ]
    }
   ],
   "source": [
    "vowels = ['a','e','i','o','u']\n",
    "word = \"milliways\"\n",
    "# 检查word中出现的元音\n",
    "\n",
    "#for letter in word :# 第一个元素letter请不要和已有变量重名\n",
    "                     # 第一个元素一般不定义名字，常用item（元素）来命名，或简写i来命名\n",
    "                     # 第二个元素word（重要），意味着将遍历的内容\n",
    "                     # 遍历的内容一般是 序列数据 str list\n",
    "for letter in word:\n",
    "#     print(letter)\n",
    "    if letter in vowels:\n",
    "        print(letter)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "297fd451",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 使用append（）新建列表\n",
    "found = []\n",
    "for letter in word:\n",
    "    if letter in vowels:#letter 在 元音字母表中\n",
    "        if letter not in found : #letter不在found表中\n",
    "            found.append"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c6e48c57",
   "metadata": {},
   "outputs": [],
   "source": [
    "#用户输入 #打印包装 # 列表，列表中的列表\n",
    "#价格与余额比较\n",
    "#提醒用户append\n",
    "#循环for 或 while true（在哪插入？）\n",
    "# 购物车found 余额多少"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2a1ca32f",
   "metadata": {
    "ExecuteTime": {
     "start_time": "2021-10-25T06:47:31.292Z"
    }
   },
   "outputs": [],
   "source": [
    "# 购物车程序项目\n",
    "usersmoney = input(\"请输入支付宝余额:\")\n",
    "info = '''------商品清单------\n",
    "\n",
    "'''\n",
    "# usersmoney:\n",
    "print(info)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3d4f7e4f",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 一个if对应一个else"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "16f6ca44",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 商品信息的数据存放（编号，名称，价格）\n",
    "# 列表嵌套\n",
    "# 每一个商品的内容是一个多个值的值，可选用list\n",
    "# 重复代码必想到for\n",
    "goods_list = [[]]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
